function getMap(){
    			var myChartMap = echarts.init(document.getElementById('myMap'));
    			var placeList = []; 
    			 $.ajax({
                url: "directBank/ChinaMap.html",
                //url: "servlet/servletDemo1?type="+encodeURI(postType),
                type: "POST",
                dataType: "JSON",
                async: false,
                success: function(json){
                    for (var i = 0; i < json.length; i++) {
                        placeList.push({
                            name: json[i].PROVINCE,
                            value: json[i].JYL
                        });
    			   }
                    console.log(placeList);
                    return placeList;
                }
                
            });
    			
    			OptionMap = ({
    			
    				backgroundColor: '#000000',
    				color: ['gold', 'aqua', 'lime'],
    				tooltip: {
    					trigger: 'item',
    					textStyle: {
    						color: '#fff',
    						fontFamily: '楷体',
    						
    						fontWeight: 'bolder'
    					}
    				},
    				dataRange: {
    					show: false,
    					min: 0,
    					max: 500,
    					calculable: true,
    					color: ['#ff3300', 'orange', 'yellow', 'lime', 'aqua'],
    					textStyle: {
    						color: '#fff'
    					}
    				},
    				series: [{
    					name: '全国',
    					type: 'map',
    					mapType: 'china',
    					roam: false,
    					hoverable: false,
    					mapLocation: {
    						x: 'center',
    						y: 'center',
    						width: '100%',
    						height: '100%'
    					
    					},
    					itemStyle: {
    						normal: {
    							//                  borderColor: 'rgba(100,149,237,1)',
    							borderColor: '#399ada',
    							borderWidth: 1.5,
    							areaStyle: {
    								color: '#000000'
    							}
    						},
    					
    					},
    					data: [],
    					
    					markPoint: {
    						symbol: 'Circle',
    						symbolSize: 3, // 标注大小，半宽（半径）参数，当图形为方向或菱形则总宽度为symbolSize * 2
    						itemStyle: {
    							normal: {
    								//                        borderColor: '#87cefa',
    								//                        borderWidth: 0,            // 标注边线线宽，单位px，默认为1
    								label: {
    									show: false
    								}
    							},
    						
    						},
    						coordinateSystem: 'geo',
    						data: placeList,
    					},
    					
    					geoCoord: {
    					
    						"上海": [121.4648, 31.2891],
    						'新疆': [87.9236, 43.5883],
    						'甘肃': [103.5901, 36.3043],
    						'北京': [116.4551, 40.2539],
    						'江苏': [118.8062, 31.9208],
    						'广西': [108.479, 23.1152],
    						'江西': [116.0046, 28.6633],
    						'安徽': [117.29, 32.0581],
    						'内蒙古': [111.4124, 40.4901],
    						'黑龙江': [127.9688, 45.368],
    						'天津': [117.4219, 39.4189],
    						'山西': [112.3352, 37.9413],
    						'广东': [113.27, 23.13],
    						'四川': [103.9526, 30.7617],
    						'西藏': [91.1865, 30.1465],
    						'云南': [102.9199, 25.4663],
    						'浙江': [119.5313, 29.8773],
    						'湖北': [114.3896, 30.6628],
    						'辽宁': [123.1238, 42.1216],
    						'山东': [117.1582, 36.8701],
    						'海南': [110.3893, 19.8516],
    						'深圳': [114.5435, 22.5439],
    						'河北': [114.4995, 38.1006],
    						'福建': [119.4543, 25.9222],
    						'青海': [101.4038, 36.8207],
    						'陕西': [109.1162, 34.2004],
    						'贵州': [106.6992, 26.7682],
    						'河南': [113.4668, 34.6234],
    						'重庆': [107.7539, 30.1904],
    						'宁夏': [106.3586, 38.1775],
    						'吉林': [125.8154, 44.2584],
    						'湖南': [113.0823, 28.2568],
    						'香港': [114.10, 22.20],
    						'澳门': [113.33, 22.13],
    						'台湾': [121.50, 25.05]
    					
    					
    					
    					}
    				
    				}, {
    					name: '交易量',
    					type: 'map',
    					mapType: 'china',
    					data: [],
    					markPoint: {
    						symbol: 'emptyCircle',
    						
    						symbolSize: function(v){
    							if (v <= 30) {
    								return 4;
    							}
    							else if (v <= 100 && v > 30) {
    								return 5 + v / 1000
    							}
    							else 
    								if (v < 10000 && v > 100) {
    									return 5 + v / 1000
    									
    								}
    								else {
    									return 15;
    								}
    						},
    						effect: {
    							show: true,
    							shadowBlur: 0,
    						
    						},
    						itemStyle: {
    							normal: {
    								label: {
    									show: false
    								}
    							},
    							emphasis: {
    								label: {
    									position: 'top'
    								}
    							}
    						},
    						
    						
    						data: placeList,
    					
    					
    					}
    				
    				}, ]
    			});
    		    myChartMap.setOption(OptionMap); 	
    			myChartMap.on('dblclick', function (param) {
    		      	var selectProvice = param.name;//获得选中的城市
    		    	console.log(selectProvice);
    	    		  /*$.ajax({
    	                  url: "directBank/redirectProvince.html",
    	                  type: "POST",
    	                  dataType: "JSON",
    	                  //async: false,
    	                  success: function(json){
    	      	         }
    	                  
    	              });*/
    		    	//parent.window.open ("/directBank/index");
    		      	//alert("省份"+selectProvice);
    		    	var newPostType='直销银行';
    		    	window.open ("cdnsShowProvince.html"+"?selectProvice="+encodeURI(selectProvice)+','+encodeURI(newPostType));
    		    	//window.open ("cdnsShowProvince.html"+"?selectProvice="+selectProvice);
    		
    		                  });
    		}
    		
    		
        	//左上grid柱狀圖01
    		function getBar(){
    		var placeName = [];
            var palceValue = []; 
            var averageLength = null;
    		
    		  $.ajax({
                url: "directBank/ChinaTopTen.html",
                type: "POST",
                dataType: "JSON",
                async: false,
                success: function(json){
                    var jsonPx = [];
                    jsonPx = json;
    				jsonPx.sort(function(a, b){
                        return a.JYL > b.JYL ? 1 : -1;
                    });
                    for (var i = 0;i<json.length; i++) {
                        placeName.push(json[i].PROVINCE);
                        palceValue.push(json[i].JYL);
                        
                    }
                    averageLength = json[json.length-2].JYL*2;
                    //return  placeName, averageLength;
                    document.getElementById("bar").innerHTML="<div id='bar01' style='height: 100%; width: 99%; border: 2px solid #399ada; border-radius: 10px;'></div>";
    	         }
                
            });
    		  var myChartBar01 = echarts.init(document.getElementById('bar01'));
    			optionbar01 = ({
    			
    				backgroundColor: '#000000',

     				 title: {
    					text: '各省业务流量TOP10',
    					x: 'center',
    					textStyle: {
    						color: '#fff',
    						fontFamily: '仿宋',
    						fontSize: 18,
    						fontWeight: 'bolder'
    					}
    				}, 
    				grid:{
    					borderWidth :0,
    					x:'30%',
    					y:'5%',
    					x2:'5%',
    					y2:'2%'
    				},
    				
    				tooltip: {
    					show: true,
    					formatter: "{a} <br/>{b} : {c} ",
    					textStyle: {
    						color: '#fff',
    						fontFamily: '楷体',
    						
    						fontWeight: 'bolder'
    					}
    				
    				},
    				xAxis: [{
    					show: 'false',
    					type: 'value',
    					//boundaryGap: [0, 0.01],
    					splitLine: 'false',
    					axisLine: 'false',
    					axisLabel: 'false',
    					position:'top',
    					min: 0,
    		            max: averageLength
    				}],
    				yAxis: [{
    					type: 'category',
    					splitLine: 'false',
    					axisLine: 'false',					
    					data: placeName,
    //					position:'right',
    					axisLabel: {
    						textStyle: {
    							color: '#fff',
    							fontFamily: '仿宋',
    							fontSize : 16
    						}
    					}
    				}, ],
    				series: [{
    				
    					name: '交易量',
    					type: 'bar',
    					barWidth: '10',
//    					barGap: '20',
    					barMinHeight: 20,
    					itemStyle: {
    						normal: {
    							color:'#399ada',
    							barBorderRadius: [3, 3, 3, 3]
    						}
    					
    					},
    					
    					data: palceValue
    				
    				}]
    			});
    		   
        	myChartBar01.setOption(optionbar01);
        	
    		}
    		
    		function getLine(){
				var myChartLine = echarts.init(document.getElementById('line01'));
				var placeHH = [];
				var placeJYL = [];
				$.ajax({
                url: "directBank/ChinaRealTime.html",
                type: "POST",
                dataType: "JSON",
                async: false,
                success: function(json){
                	if(json.length>0){
                		for (var i = 0; i < json.length; i++) {
                            placeHH.push(json[i].HH);
    						placeJYL.push(json[i].JYL)
                             
                            
                        }
                        
            			optionLine01 = {
            					backgroundColor: '#000000',
        						    title : {
        						        text: '交易量峰值统计',
        						        show :false ,
        						    },
        						    tooltip : {
        						        trigger: 'axis',
        						        formatter: function(params) {
        						            return  params[0].name + '<br/>'+
        									params[0].seriesName + ' : ' + params[0].value
        						                  
        						        }
        						    },
        						grid:{
        						   x: 80,
        						   y: 10,
        						   width: '70%',
        						   height:'70%',
        						   borderWidth:0,
//        						   borderColor:'#399ada'
        						   
        						   },
         
        						    xAxis : [
        						        {
        						            type : 'category',
        						            boundaryGap : true,
        									splitLine: 'false', 
        									axisTick: false,
        									splitNumber :12,	  							
        									axisLabel: {
        			    						textStyle: {
        			    							color: '#fff',
        			    							fontFamily: '楷体',
        			    							fontSize : 16
            									}
            								},
        						            data : placeHH
        						        }
        						    ],
        						    yAxis : [
        						        {
        									
        						            type : 'value',
        									splitLine:false,
        									lineStyle:{
        										color:'#399ada',
        									}	,			
        			    					axisLabel: {
        			    						textStyle: {
        			    							color: '#fff',
        			    							fontFamily: '楷体',
        			    							fontSize : 16
            									}
            								},
        								splitNumber :5,
        						        },
        								
        						    ],
        						    series : 
        						      [  {
        						            name:'交易量',
        						            type:'line',
        									smooth :true,
        									symbol: 'none',
        									animation:false,
        									itemStyle:{
        										normal:{
        											color:'#399ada',
        											areaStyle:{
        											type: 'default',
        											color:'#399ada'
        											}
        										}
        										
        									},
        						           
        						            data:placeJYL           
        						        	},
        									
        						       
        						       ]
            			}
        				myChartLine.setOption(optionLine01);
                	}
                }
                
            });
	
  				

    		}
    		
    		
        	//右上grid柱狀圖01
    		function getRightBar(){
    		var placeNameRight = [];
            var palceValueRight = []; 
            
    		 var myChartBar02 = echarts.init(document.getElementById('bar02'));
    		  $.ajax({
                url: "directBank/ChinaTypeTopTen.html",
                type: "POST",
                dataType: "JSON",
                async: false,
                success: function(json){
                    var jsonPx = [];
                    jsonPx = json;
    				jsonPx.sort(function(a, b){
                        return a.NM > b.NM ? 1 : -1;
                    });
    				if(json.length>0){
    					for (var i = 0;i<json.length; i++) {
                        	if(json[i].EXTEND01!=null){
                            placeNameRight.push(json[i].EXTEND01);
                            palceValueRight.push(json[i].NM);
                        	}
                            
                        }
            			
            			optionbar01 = ({
            			
            				backgroundColor: '#000000',

             				 title: {
            					text: '交易类型TOP10',
            					top:'30%',
            					x: 'center',
            					textStyle: {
            						color: '#fff',
            						fontFamily: '仿宋',
            						fontSize: 18,
            						fontWeight: 'bolder'
            					}
            				}, 
            				grid:{
            					borderWidth :0,
            					x:'40%',
            					y:'5%',
            					x2:'5%',
            					y2:'5%'
            				},
            				
            				tooltip: {
            					show: true,
            					formatter: "交易量"+":{c} ",
            					textStyle: {
            						color: '#fff',
            						fontFamily: '楷体',
            						
            						fontWeight: 'bolder'
            					}
            				
            				},
            				xAxis: [{
            					show: 'false',
            					type: 'value',
            					boundaryGap: [0, 0.01],
            					splitLine: 'false',
            					axisLine: 'false',
            					axisLabel: 'false',
            					position:'top',
            
            				}],
            				yAxis: [{
            					type: 'category',
            					splitLine: 'false',
            					axisLine: 'false',					
            					data: placeNameRight,
            //					position:'right',
            					axisLabel: {
            						textStyle: {
            							color: '#fff',
            							fontFamily: '仿宋',
            							fontSize : 16
            						}
            					}
            				}, ],
            				series: [{
            				
            					name: '交易量',
            					type: 'bar',
            					barWidth: '10',
//            					barGap: '20',
            					barMinHeight: 20,
            					itemStyle: {
            						normal: {
            							color: function(params){
            								// build a color map as your need.
            								var colorList = ['#399ada', '#d0be05', '#e63820', '#9355ad', '#27727B', '#FE8463', '#9BCA63', '#FAD860', '#F3A43B', '#60C0DD', '#D7504B', '#C6E579', '#F4E001', '#F0805A', '#26C0C0', '#ff7f50', '#87cefa', '#da70d6', '#32cd32', '#6495ed', '#ff69b4', '#ba55d3', '#cd5c5c', '#ffa500', '#40e0d0'];
            								//                        var colorList = [ 'aqua', 'lime','yellow', 'orange','#ff3333' ];
            								return colorList[params.dataIndex]
            							},
            
            							
            							//barBorderColor: '#fff',
            							barBorderRadius: [3, 3, 3, 3]
            						}
            					
            					},
            					
            					data: palceValueRight
            				
            				}]
            			});
            		   
                	myChartBar02.setOption(optionbar01);
    				}
                    
    	         }
                
            });
        	
    		}
    		
    		
        function getSum(){
    		var placeSUMPAYAMT = [];
        	var palceJSHU = [];
    		$.ajax({
    				url: "directBank/ChinaSaleAmount.html",
    				type: "POST",
    				dataType: "JSON",
    				async: false,
    				success: function(json){
    					if(json.length>0){
        					for (var i = 0; i < json.length; i++) {
        						placeSUMPAYAMT.push(json[i].SUMPAYAMT);
        						palceJSHU.push(json[i].JSHU);
        					}
        					document.getElementById("TDdata").innerHTML=
        						"<ul style='margin-right: 10%; padding-top: 5%; padding-bottom: 5%; font-family: KaiTi;'>"
        						+"<li style='color: #7ded2e; font-size: 24px;'>"
        						+"<span style='color: #94c0fc; font-family: FangSong; font-weight: bold; font-size: 20px;'>交易金额(万元)</span></br>"
        						+"<span id='sumData01' style='color: #94c0fc; font-family: FangSong; font-weight: bold; font-size: 20px;'>"+placeSUMPAYAMT+"</span></li>"
        						+"<li style='color: #7ded2e; font-size: 24px; margin-top: 5%'>"
        						+"<span style='color: #94c0fc; font-family: FangSong; font-weight: bold; font-size: 20px;'>交易量(笔)</span></br>"
        						+"<span id='sumData02' style='color: #94c0fc; font-family: FangSong; font-weight: bold; font-size: 20px;'>"+palceJSHU+"</span></li></ul>";
    					}

    					
    				}
    				
    			});


    		/* document.getElementById("sumData01").innerHTML = placeSUMPAYAMT ;
    		document.getElementById("sumData02").innerHTML = palceJSHU ; */
    		
    	}
    	
  	   function showTime(){
  	   	    var date = new Date();
  	   		var year = date.getFullYear();  
  	   		var month = date.getMonth() + 1;
  	   		var day = date.getDate();
  	   		var hour = date.getHours();
  	   		var minutes = date.getMinutes();
  	   		var second = date.getSeconds();
  	   		var timestr ="直销银行 " + year+"年"+month+"月"+day+"日 "+check(hour)+ ":"+check(minutes)+":"+check(second);  
  	   		document.getElementById("stTime").innerHTML = timestr;  
  	           var timerID = setTimeout('showTime()',1000); 
  	   	   };
  	   	   		showTime();
    		getSum();
        	getMap();
    		getBar();
    		getRightBar();
    		//getPie();
			getLine();
			//getRightBar(postType);
           setInterval(getMap,120000);
     	   setInterval(getBar,120000);
    	   setInterval(getRightBar,120000);
    	   setInterval(getSum,120000);
		   setInterval(getLine,120000);
                    
           